package com.xzzz.backend.bsms.server.base.middleware.pojo;

import lombok.Data;

/**
 * 中间件状态信息
 */
@Data
public class MiddlewareInfoRes {

    /**
     * 中间件类型
     */
    private String type;

    private String name;

    private String url;

    private String version;

    private String desc;

    private Integer nodeTotal;

    private Integer nodeSuccess;

    private Integer nodeFailure;

    public static MiddlewareInfoRes buildNone(String type, String url) {
        MiddlewareInfoRes middleware = new MiddlewareInfoRes();
        middleware.setType(type);
        middleware.setUrl(url);
        middleware.setVersion("NONE");
        middleware.setNodeTotal(0);
        middleware.setNodeSuccess(0);
        middleware.setNodeFailure(0);
        return middleware;
    }
}
